home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 32 / Amiga Format AFCD32 (Nov 1998, Issue 117).iso / -seriously_amiga- / programming / basic / textreader / gt.help next >
Text File  |  1998-08-10  |  4KB  |  120 lines

  1. ;NOTE: lines starting with ";" are comments and ignored by the reader
  2. ;      lines starting with "^" are indexes.  The "^" is removed,
  3. ;      and the rest will be put on the cycle gadget.
  4. ;      lines starting with ">" are the links.  The ">" is removed
  5. ;      and the reader will jump there when the Go To gadget is clicked.
  6. ;      The text must be exactly the same as the index!
  7. ;      example "^Page One" will jump to
  8. ;              ">Page One" 
  9. ;              "> Page One" will not work!
  10. ;the indexes can be anywhere in the text, but must come BEFORE the link.
  11. ;no tabs or anything, but you can use"}" at the beginning of a line to center
  12. ;the line of text on the current window size (if possible).  The links
  13. ;can be centered too.
  14. ;they don't need to match here, "^Page One" and ">}Page One" will work.
  15.  
  16. }GT TEXT READER
  17.  
  18. }By CURT ESSER
  19.  
  20. }Use in any way you like
  21. }Select a subject with the cycle gadget
  22. }Then click the Go To button
  23. }or use the arrows to browse
  24. ^What is it?
  25. ^Gadgets
  26. ^Window
  27. ^Fonts
  28. ^Contact
  29. ^Text file
  30. ^Questions
  31.  
  32. }**<>**
  33.  
  34. >}What is it?
  35.  
  36. Basicly (excuse the pun), it is a text reader in a window.  I made it for use as an online help system.
  37. The text is put onto a GTlistview gadget, which gives you automatic scrolling with the scrollbar and arrows.
  38. There are also some optional gadgets for selecting subjects in the text, if you want to include them.
  39.  
  40. }**<>**
  41.  
  42. >}Gadgets
  43.  
  44. You can specify 0,1,or 2 gadgets at the start of the program.
  45. 2 will give you both the cycle gadget for selecting subjects, and the go to button.
  46. 1 gives only the cycle gadget - the text will "jump" each time it is pressed.
  47. 0 will show the listview only - similar to the text reader in MultiView.
  48.  
  49. }**<>**
  50.  
  51. >}Window
  52.  
  53. You can set the window to any size that will fit on the screen.
  54. The width is set in pixels, and the height in lines of text.
  55. Note that the height will change, depending on how large your font is, and whether you use the buttons or not.
  56. It will always be large enough to show the specified number of text lines on the GTlistview.
  57. The window will remember it's position when you close it, and will re-open in the same place you dragged it to.
  58.  
  59. }**<>**
  60.  
  61. >}Fonts
  62.  
  63. The reader is font sensitive.  You can specify any font (within reason!) and the window and gadgets will automatically adjust for it.
  64. Yes, you can use proportional fonts too.
  65. The reader also does a crude form of word wrapping.  The lines will be split at spaces to fit in the window.
  66. But the other lines are not brought up to fill the empty spaces  (hey, it's not a word processor!)
  67. This was good enough for my purposes - if you want to enhance it, go ahead.
  68.  
  69. }**<>**
  70.  
  71. >}Contact
  72.  
  73. If you have any questions or come up with any improvements, you can contact me at:
  74.  
  75. }Curt Esser
  76. }113 Pauline Avenue
  77. }Crystal Lake  Il.  60014
  78. }USA
  79.  
  80. or email me at:
  81.  
  82. }camge@ix.netcom.com
  83.  
  84. }**<>**
  85.  
  86. >}Text file
  87.  
  88. Maximum line length is 255 characters
  89. Lines starting with ";" are comments and will be ignored by the reader.
  90. Lines starting with "^" are indexes.  The "^" is removed, and the rest will be put on the cycle gadget.
  91. Lines starting with ">" are the links.  The ">" is removed and the reader will jump there when the Go To gadget is clicked.
  92. The text must be exactly the same as the index!
  93. Example "^Page One" will jump to
  94.         ">Page One" 
  95.     but "> Page One" will not work!
  96. The indexes can be anywhere in the text, but must come BEFORE the link.
  97. There are no tabs, but you can use"}" as the first character to center the line of text on the current window size (if possible). 
  98. The links can be centered too.
  99. They don't need to match here:
  100.   "^Page One" and
  101.  ">}Page One" will work.
  102.  
  103. }**<>**
  104.  
  105. >}Questions
  106.  
  107. Q How many lines of text can it use?
  108.  
  109. A I'm not sure.  Experiment and find out.
  110.   I have tested it with a 500 line text file, and this works fine.
  111.   Don't forget to dimension your list for enough text lines!
  112.   Remember when the lines are word-wrapped they can become 2 or more lines.
  113.   There is no harm in using a very large dimension for the list.
  114.   The list only uses as much memory as it needs.
  115.  
  116. Q Can it be linked to a menu?
  117.  
  118. A Yes, it actually is written this way in the program I wrote it for.
  119.   I left this out of this example to keep things simple.
  120.   If you need help with this, contact me.